1. Field of the Invention
The present invention relates to an image processing apparatus and method, in particular, for inspecting defects such as pinholes or breakage in an enclosure of a semiconductor device, by using density images of the enclosure. The enclosure is, for example, resin mold.
2. Description of the Related Art
Conventionally, a defect inspection of resin mold products of semiconductor devices has been performed by the naked eye, with respect to all products or products selected at random. However, the precision of the inspection by the naked eye varies from person to person, and is not reliable. Further, the size of semiconductor devices has been decreased year by year, and the inspection has been conducted with use of a microscope, resulting in fatigue of the eye. Under these circumstances, the precision of the inspection by the eye is low.
On the other hand, in a well-known inspection method, image data of the surface of a resin mold is converted to an electric signal through a photoelectric converter, and two-value image data items are produced by providing a given threshold value. However, in the two-value processing, the amount of obtained image data is small and the determination of the threshold value is very difficult.
A method of an inspection using density images of an object is disclosed in "HITACHI Hyoron, vol. 67, No. 9, 1985, Small-Sized Image Processing Apparatus for Electronic Part Inspection, SBIP (pp. 71-74)". This document teaches a technique of inspection using light-emission patterns of light-emitting diodes. In this technique, a light emission pattern of a light-emitting diode, consisting of a light-emission area 101 and a background area 102, is obtained by a TV camera (see FIG. 9A). From this light emission pattern, a graph showing a distribution of degrees of density as shown in FIG. 9B is prepared. If the brightness (or density) of light emission pattern is higher or lower than a reference value, a difference R between the density of the light emission area 103 and the background area 104 varies. Namely, the brightness can be detected by checking whether or not the difference R falls within the scope of the reference value. A divergent value of an emission light pattern density distribution is obtained, as shown in FIG. 9C, and compared with a reference divergent value, thus detecting light emission blurring.
As stated above, various drawbacks reside in the method of inspecting defects in the resin mold of a resin-sealed type semiconductor apparatus, which is performed by the eye. Under the circumstance, it is desired to develop a system for automating the process of the inspection thereby to manufacture reliable semiconductor devices at a high productivity. In this system, when a malfunction occurs in a step of the process, the process routine is immediately returned to the previous step.
In most of currently developed automated image processing systems for defect inspection using two-value data, it is very difficult to determine the threshold value when a contrast between a defect and the background is small, as in the case of a resin mold. Thus, suitable two-value data images cannot be obtained.
Even with the aforementioned density image processing system, correct detection of defects on a resin surface is difficult, since a drift is caused in the density due to a temperature rise in an ITV camera, a trademark or the like is printed on the surface of an object or a resin mold. Further, for automation of defect inspection, a pre-process of detecting the position of the object is necessary. However, a contrast between the resin mold and the background is low, and the distinction therebetween is difficult. Thus, it is difficult to precisely detect the position of the resin mold.